<template>
  <div class="placeholder-page">
    <div class="placeholder-content">
      <div class="placeholder-icon">{{ icon }}</div>
      <h1 class="placeholder-title">{{ title }}</h1>
      <p class="placeholder-description">{{ description }}</p>
      <div class="placeholder-features">
        <h3>即将推出的功能：</h3>
        <ul>
          <li v-for="feature in features" :key="feature">{{ feature }}</li>
        </ul>
      </div>
      <div class="placeholder-actions">
        <router-link to="/" class="back-button">
          ← 返回首页
        </router-link>
        <router-link to="/chat" class="chat-button">
          💬 开始对话
        </router-link>
      </div>
    </div>
  </div>
</template>

<script>
import { computed } from 'vue'
import { useRoute } from 'vue-router'

export default {
  name: 'PlaceholderPage',
  setup() {
    const route = useRoute()

const pageConfig = {
  image: {
    icon: '🎨',
    title: '图像创作',
    description: '用心绘制每一幅作品，让想象化为现实',
    features: [
      '手绘风格图像生成',
      '多种艺术风格选择',
      '高清图像输出',
      '个性化定制',
      '创意灵感库'
    ]
  },
  text: {
    icon: '✍️',
    title: '文字创作',
    description: '书写故事与想法，让文字充满生命力',
    features: [
      '多种文体风格支持',
      '智能写作助手',
      '语法检查和优化',
      '创意内容生成',
      '多语言支持'
    ]
  },
  music: {
    icon: '🎵',
    title: '音乐创作',
    description: '谱写旋律与节拍，创造动人的音乐',
    features: [
      '多风格音乐创作',
      '乐器组合配置',
      '音频渲染输出',
      '节拍和旋律控制',
      '专业乐谱导出'
    ]
  },
  video: {
    icon: '🎥',
    title: '视频制作',
    description: '编辑画面与故事，制作精彩的视频',
    features: [
      '直观的视频编辑',
      '智能字幕生成',
      '特效和转场',
      '多格式输出',
      '专业效果库'
    ]
  }
}

const currentPage = computed(() => {
  const pageName = route.name?.toLowerCase()
  return pageConfig[pageName] || pageConfig.image
})

    const icon = computed(() => currentPage.value.icon)
    const title = computed(() => currentPage.value.title)
    const description = computed(() => currentPage.value.description)
    const features = computed(() => currentPage.value.features)

    return {
      icon,
      title,
      description,
      features
    }
  }
}
</script>

<style scoped>
.placeholder-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #FAF8F5 0%, #f5f3f0 50%, #F0EDE8 100%);
  position: relative;
}

.placeholder-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(250, 234, 218, 0.15) 0%, transparent 25%),
    radial-gradient(circle at 75% 75%, rgba(163, 196, 188, 0.1) 0%, transparent 25%);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 0;
}

.placeholder-content {
  max-width: 600px;
  text-align: center;
  background: rgba(255, 255, 255, 0.95);
  padding: 60px 40px;
  border-radius: 24px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(163, 196, 188, 0.2);
  position: relative;
  z-index: 1;
}

.placeholder-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #8B7355, #A3C4BC, #8B7355);
  border-radius: 24px 24px 0 0;
}

.placeholder-icon {
  font-size: 80px;
  margin-bottom: 24px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.placeholder-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #8B7355;
  margin-bottom: 16px;
  position: relative;
}

.placeholder-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #A3C4BC, transparent);
  border-radius: 2px;
}

.placeholder-description {
  font-size: 1.125rem;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 40px;
  position: relative;
  padding: 0 20px;
}

.placeholder-description::before,
.placeholder-description::after {
  content: '“';
  font-size: 2rem;
  color: #A3C4BC;
  position: absolute;
  opacity: 0.5;
}

.placeholder-description::before {
  top: -10px;
  left: 0;
}

.placeholder-description::after {
  content: '”';
  bottom: -10px;
  right: 0;
}

.placeholder-features {
  margin-bottom: 40px;
  text-align: left;
  background: rgba(163, 196, 188, 0.05);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(163, 196, 188, 0.2);
}

.placeholder-features h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #8B7355;
  margin-bottom: 16px;
  text-align: center;
  position: relative;
}

.placeholder-features h3::before {
  content: '✨';
  margin-right: 8px;
}

.placeholder-features ul {
  list-style: none;
  padding: 0;
}

.placeholder-features li {
  padding: 10px 0;
  color: #4b5563;
  position: relative;
  padding-left: 32px;
  transition: all 0.3s ease;
  border-radius: 8px;
  margin: 4px 0;
}

.placeholder-features li:hover {
  background: rgba(163, 196, 188, 0.1);
  transform: translateX(4px);
}

.placeholder-features li::before {
  content: '•';
  position: absolute;
  left: 12px;
  top: 10px;
  color: #8B7355;
  font-size: 1.2rem;
}

.placeholder-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.back-button,
.chat-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.back-button {
  background: rgba(255, 255, 255, 0.8);
  color: #8B7355;
  border: 1px solid #A3C4BC;
  backdrop-filter: blur(10px);
}

.back-button:hover {
  background: rgba(163, 196, 188, 0.1);
  border-color: #8B7355;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 115, 85, 0.2);
}

.chat-button {
  background: linear-gradient(135deg, #8B7355, #A3826B);
  color: white;
  border: none;
  box-shadow: 0 4px 16px rgba(139, 115, 85, 0.3);
}

.chat-button:hover {
  background: linear-gradient(135deg, #A3826B, #8B7355);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(139, 115, 85, 0.4);
}

.chat-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.chat-button:hover::before {
  left: 100%;
}

@media (max-width: 480px) {
  .placeholder-content {
    padding: 40px 24px;
  }

  .placeholder-title {
    font-size: 2rem;
  }

  .placeholder-icon {
    font-size: 60px;
  }

  .placeholder-actions {
    flex-direction: column;
  }

  .back-button,
  .chat-button {
    width: 100%;
    justify-content: center;
  }
}
</style>